<?php
//php支持多行字符串

//字符串函数
//strlen 字符串的长度
$s="计算机0Aa";
echo strlen($s),"\n";
//ord 首字节的编码
echo ord("0123"),"\n";
//substr取子串
echo substr($s,9),"\n";

echo substr($s,6,5),"\n";
//
printf("My name is %s,l'm %d years old.\n","zhangsan",18);
printf("[%d][ %5d] [%-5d] [%05d] [%x] [%04x]\n",26,26,26,26,26,26);
//
for ($i=0,$len=strlen($s); $i<$len;$i++){
    printf("%o2x",ord($s[$i]));
}


























